using System;

namespace ProjectEuler.Core
{
    public class Problem6 : IProjectEulerProblem
    {
        public static int SumOfTheSquaresForNumbers1Through(int n)
        {
            var sum = 0;
            for(int i=1;i<=n;i++)
            {
                sum += i*i;
            }
            return sum;
        }

        public static int SquareOfTheSumForNumbers1Through(int n)
        {
            var sum = 0;
            for (int i = 1; i <= n; i++)
            {
                sum += i;
            }
            return sum*sum;
        }

        public int Number
        {
            get { return 6; }
        }

        public string Description
        {
            get
            {
                return
                    "Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.";
            }
        }

        public string Answer
        {
            get { return (SquareOfTheSumForNumbers1Through(100) - SumOfTheSquaresForNumbers1Through(100)).ToString(); }
        }
    }
}